﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace WMS_Api.Areas.MesSystem.Models
{
    /// <summary>
    /// 
    /// </summary>
    public class MesMaterialReceiveModel
    {
        /// <summary>
        /// 收料单号
        /// </summary>
        [Required(ErrorMessage = "收料单不允许为空!")]
        public string mr_no { get; set; }

        /// <summary>
        ///  创建时间（unix时间戳）
        /// </summary>
        [RegularExpression(@"^\d{13}$", ErrorMessage = "创建时间create_time为13位的时间戳!")]
        public long create_time { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        [Required(ErrorMessage = "物料编码不允许为空!")]
        public string part_no { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        [Required(ErrorMessage = "物料名称不允许为空!")]
        public string part_name { get; set; }

        /// <summary>
        /// 规格型号，包含特殊字符、空格等
        /// </summary>
        public string part_spec { get; set; }

        /// <summary>
        /// 供应商编码
        /// </summary>
        public string vendor_no { get; set; }

        /// <summary>
        ///  供应商名称
        /// </summary>
        public string vendor_name { get; set; }

        /// <summary>
        /// 收料数量
        /// </summary>
        public decimal quantity { get; set; }

        /// <summary>
        /// 采购单号
        /// </summary>
        public string po_no { get; set; }

        /// <summary>
        /// 生产通知单号
        /// </summary>
        public string notice_no { get; set; }
    }

    /// <summary>
    /// 
    /// </summary>
    public class MesMaterialReceiveExtendModel : BaseInfoModel
    {
        /// <summary>
        /// 
        /// </summary>
        public List<MesMaterialReceiveModel> data { get; set; }
    }
}